package com.ss.android.common.app;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

public final class AppHooks {
    public interface ActivityLifeCycleHook {
        void onActivityResumed(Activity activity);

        void onActivityPaused(Activity activity);
    }

    public interface ActivityResultHook {
        boolean onActivityResult(Activity activity, int arg2, int arg3, Intent intent);
    }

    public interface AppBackgroundHook {
        void onAppBackgroundSwitch(boolean arg1);
    }

    public interface AppStartMonitorHook {
        void onAppStartMonitor();
    }

    public interface InitHook {
        void tryInit(Context arg1);
    }

    public static int mAvailableActivityNum = 0;
    public static int mForegroundActivityNum = 0;
    private static InitHook mInitHook = null;
    private static ActivityLifeCycleHook mActivityHook = null;
    private static ActivityResultHook mActivityResultHook = null;
    private static AppBackgroundHook mAppBackgroundHook = null;
    private static AppStartMonitorHook mAppStartMonitorHook = null;

    public static InitHook getInitHook() {
        return AppHooks.mInitHook;
    }

    public static void setInitHook(InitHook arg0) {
        AppHooks.mInitHook = arg0;
    }

    public static void setActivityHook(ActivityLifeCycleHook arg0) {
        AppHooks.mActivityHook = arg0;
    }

    public static void setActivityResultHook(ActivityResultHook arg0) {
        AppHooks.mActivityResultHook = arg0;
    }

    public static void setAppBackgroundHook(AppBackgroundHook arg0) {
        AppHooks.mAppBackgroundHook = arg0;
    }

    public static void getAppBackgroundHook(AppStartMonitorHook arg0) {
        AppHooks.mAppStartMonitorHook = arg0;
    }

    public static ActivityLifeCycleHook getActivityHook() {
        return AppHooks.mActivityHook;
    }

    public static ActivityResultHook getActivityResultHook() {
        return AppHooks.mActivityResultHook;
    }

    public static AppBackgroundHook getAppBackgroundHook() {
        return AppHooks.mAppBackgroundHook;
    }

    public static AppStartMonitorHook getAppStartMonitorHook() {
        return AppHooks.mAppStartMonitorHook;
    }
}

